const person = {
    firstName: "Lydia",
    lastName: "Hallie",
    pet: {
        name: "Mara",
        breed: "Dutch Tulip Hound",
    },
    getFullName() {
        return `${this.firstName} ${this.lastName}`;
    },
};
//? 可选链操作符?.
console.log(person.pet?.name);   //? Mara
console.log(person.pet?.family?.name); //? undefined
console.log(person.getFullName?.()); //? Lydia Hallie
console.log(member.getLastName?.()); //? ReferenceError: member is not defined

